package com.googlecode.wmlynar.javadoctc.analyzers.tests;

import java.io.File;

import com.googlecode.wmlynar.javadoctc.domain.JavaDocClassPool;
import com.googlecode.wmlynar.javadoctc.reportgen.ReportGenerator;
import com.thoughtworks.qdox.JavaDocBuilder;

public class UnitTestScanner {


	public static void main(String[] args) {

		JavaDocClassPool classes = scanForUnitTestMethods();

		ReportGenerator reportGen = new ReportGenerator();

		String report = reportGen.generateListClasses(classes);
		System.out.println(report);
	}

	public static JavaDocClassPool scanForUnitTestMethods() {
		JavaDocBuilder builder = new JavaDocBuilder();
		builder.addSourceTree(new File("src/test/java"));

		UnitTestCollector collector = new UnitTestCollector();
		return collector.collect(builder);
	}

}
